<div class="keywords view">
<h2><?php  echo __('Keyword');?></h2>
<div class="clear"></div>
<div class="actions selected">
	<?php echo $this->Html->link(__('Cancel'), array('controller'=>'projects','action' => 'view',$keyword['Project']['id']));?>
	<?php echo $this->Html->link(__('Edit'), array('action' => 'edit', $keyword['Keyword']['id'],'p'=>$keyword['Project']['id']));?>
	<?php echo $this->Form->postLink(__('Delete'), array('action' => 'delete', $this->Form->value('Keyword.id')), null, __('Are you sure you want to delete # %s?', $this->Form->value('Keyword.id'))); ?>
</div>
<div class="clear"></div>

	<dl>
		<dt><?php echo __('Id'); ?></dt>
		<dd>
			<?php echo h($keyword['Keyword']['id']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Project'); ?></dt>
		<dd>
			<?php echo $this->Html->link($keyword['Project']['domain'], array('controller' => 'projects', 'action' => 'view', $keyword['Project']['id'])).' - '.$keyword['Project']['name']; ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Keyword'); ?></dt>
		<dd>
			<?php echo h($keyword['Keyword']['keyword']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Position'); ?></dt>
		<dd>
			<?php echo h($keyword['Keyword']['position']); ?>
			&nbsp;
		</dd>
		<dt><?php echo __('Searches'); ?></dt>
		<dd>
			<?php echo h($keyword['Keyword']['searches']); ?>
			&nbsp;
		</dd>
	</dl>
	
	<div class="related">
		<h3><?php echo __('Related Statistics');?></h3>
		<?php if (!empty($keyword['Statistic'])):?>
		<table cellpadding = "0" cellspacing = "0">
		<tr>
			<th><?php echo __('Id'); ?></th>
			<th><?php echo __('Domain Id'); ?></th>
			<th><?php echo __('Keyword Id'); ?></th>
			<th><?php echo __('Pagerank'); ?></th>
			<th><?php echo __('Position'); ?></th>
			<th><?php echo __('Backlinks'); ?></th>
			<th><?php echo __('Created'); ?></th>
			<th class="actions"><?php echo $this->Html->link(__('New Statistic'), array('controller' => 'statistics', 'action' => 'add'));?></th>
		</tr>
		<?php
			$i = 0;
			foreach ($keyword['Statistic'] as $statistic): ?>
			<tr>
				<td><?php echo $statistic['id'];?></td>
				<td><?php echo $statistic['domain_id'];?></td>
				<td><?php echo $statistic['keyword_id'];?></td>
				<td><?php echo $statistic['pagerank'];?></td>
				<td><?php echo $statistic['position'];?></td>
				<td><?php echo $statistic['backlinks'];?></td>
				<td><?php echo $statistic['created'];?></td>
				<td class="actions">
					<?php echo $this->Html->link(__('View'), array('controller' => 'statistics', 'action' => 'view', $statistic['id'])); ?>
					<?php echo $this->Html->link(__('Edit'), array('controller' => 'statistics', 'action' => 'edit', $statistic['id'])); ?>
					<?php echo $this->Form->postLink(__('Delete'), array('controller' => 'statistics', 'action' => 'delete', $statistic['id']), null, __('Are you sure you want to delete # %s?', $statistic['id'])); ?>
				</td>
			</tr>
		<?php endforeach; ?>
		</table>
	<?php endif; ?>
	</div>
</div>
<div class="actions">	
	<?php echo $this->element('/menu/main')?>	
	<?php echo $this->element('/menu/settings')?>	
</div>

